package com.xuecheng.content.controller;

import com.xuecheng.commons.model.dto.CourseDto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.vo.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xuecheng.content.service.CourseBaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <p>
 * 课程基本信息前端控制器
 * </p>
 *
 * @author xuecheng
 */
@Slf4j
@RestController
@RequestMapping("/course")
public class CourseBaseController {


    @Autowired
    private CourseBaseService  courseBaseService;

    /*
     *
     * 分页查询课表信息列表
     * 请求
     * post、list
     * 参数
     * 公共参数
     * 查询条件 json
     * 返回值
     * pageResponseResult
     *
     * */
    @PostMapping("/list")
    public ResponseResult list(PageRequest request ,@RequestBody CourseDto dto) {
        return courseBaseService.courseList(request, dto);
    }
}
